package top.yihoxu.yoj.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import top.yihoxu.yoj.model.dto.question.QuestionQueryRequest;
import top.yihoxu.yoj.model.entity.Question;
import top.yihoxu.yoj.model.vo.QuestionVO;

import javax.servlet.http.HttpServletRequest;

/**
* @author hushi
* @description 针对表【question(题目)】的数据库操作Service
* @createDate 2024-04-28 19:04:36
*/
public interface QuestionService extends IService<Question> {

    void validQuestion(Question question, boolean b);

    /**
     * 查询条件
     */
    LambdaQueryWrapper<Question> getQueryWrapper(QuestionQueryRequest questionQueryRequest);

    /**
     * 获取题目封装
     *
     * @param question
     * @param request
     * @return
     */
    QuestionVO getQuestionVO(Question question, HttpServletRequest request);

    Page<QuestionVO> getQuestionVOPage(Page<Question> questionPage, HttpServletRequest request);
}
